﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Http;
using System.Web.Mvc;
using ChessWebService.DTO;
using ChessWebService.Models;

namespace ChessWebService.Controllers
{
    public class FriendController : ApiController
    {
        public IEnumerable<TaiKhoan> Get(int Id)
        {
            TaiKhoanDAO TaiKhoanDAO = new TaiKhoanDAO();
            List<TaiKhoan> listTK = TaiKhoanDAO.LayDanhSachBan(Id);
            return listTK;
        }

        public void Post(int Id1, int Id2)
        {
            FriendDAO FriendDAO = new FriendDAO();
            FriendDAO.ThemBanBe(Id1, Id2);
        }

        public void Delete(int Id1, int Id2)
        {
            FriendDAO FriendDAO = new FriendDAO();
            FriendDAO.XoaBanBe(Id1, Id2);
        }

    }
}
